home *** CD-ROM | disk | FTP | other *** search
/ Workbench Add-On / Workbench Add-On - Volume 1.iso / BBS-Archive / Comm / AmiTCP30b2.lha / netinclude / devices / netinfo.h next >
C/C++ Source or Header  |  1994-01-27  |  2KB  |  88 lines

  1. #ifndef DEVICES_NETINFO_H
  2. #define DEVICES_NETINFO_H
  3. /*
  4. **      $Filename: devices/netinfo.h $
  5. **    $Release$
  6. **      $Revision: 3.1 $
  7. **      $Date: 1994/01/24 07:48:28 $
  8. **
  9. **    AmiTCP/IP netinfo.device interface for 32 bit C compilers
  10. **
  11. **    Copyright © 1993 AmiTCP/IP Group, <AmiTCP-Group@hut.fi>
  12. **                  Helsinki University of Technology, Finland.
  13. */
  14.  
  15. #ifndef EXEC_TYPES_H
  16. #include <exec/types.h>
  17. #endif
  18. #ifndef EXEC_IO_H
  19. #include <exec/io.h>
  20. #endif
  21.  
  22. #define NETINFONAME "AmiTCP:devs/netinfo.device"
  23.  
  24. /*
  25.  * Modified IOStdReq
  26.  */
  27. struct NetInfoReq {
  28.     struct  Message  io_Message;
  29.     struct  Device  *io_Device;     /* device node pointer  */
  30.     struct  Unit    *io_Unit;        /* unit (driver private) */
  31.     UWORD   io_Command;            /* device command */
  32.     UBYTE   io_Flags;
  33.     BYTE    io_Error;            /* error or warning num */
  34.     ULONG   io_Actual;            /* actual number of bytes transferred */
  35.     ULONG   io_Length;            /* requested number bytes transferred*/
  36.     APTR    io_Data;            /* points to data area */
  37.     ULONG   io_Offset;            /* search criteria */
  38. };
  39.  
  40. /*
  41.  * NetInfo units
  42.  */
  43. #define NETINFO_PASSWD_UNIT    0L
  44. #define NETINFO_GROUP_UNIT     1L
  45. #define NETINFO_UNITS          2L
  46.  
  47. /* 
  48.  * Non-standard commands
  49.  */
  50. #define NI_GETBYID    (CMD_NONSTD+0)
  51. #define NI_GETBYNAME  (CMD_NONSTD+1)
  52. #define NI_MEMBERS    (CMD_NONSTD+2)
  53. #define NI_END        (CMD_NONSTD+3)
  54.  
  55. /*
  56.  * Non-standard error codes (same as in the BSD errno)
  57.  */
  58. #define NIERR_NOTFOUND      2
  59. #define NIERR_TOOSMALL      7
  60. #define NIERR_NOMEM         12
  61. #define NIERR_ACCESS        13
  62. #define NIERR_NULL_POINTER  14
  63. #define NIERR_INVAL         22
  64.  
  65. /* The passwd structure */
  66. struct NetInfoPasswd
  67. {
  68.   UBYTE *pw_name;               /* Username */
  69.   UBYTE *pw_passwd;             /* Encrypted password */
  70.   LONG   pw_uid;                /* User ID */
  71.   LONG   pw_gid;                /* Group ID */
  72.   UBYTE *pw_gecos;              /* Real name etc */
  73.   UBYTE *pw_dir;                /* Home directory */
  74.   UBYTE *pw_shell;              /* Shell */
  75. };
  76.  
  77. /* The group structure */
  78. struct NetInfoGroup
  79. {
  80.   UBYTE  *gr_name;              /* Group name.  */
  81.   UBYTE  *gr_passwd;            /* Password.    */
  82.   LONG    gr_gid;        /* Group ID.    */
  83.   UBYTE **gr_mem;               /* Member list. */
  84. };
  85.  
  86. #endif /* DEVICES_NETINFO_H */
  87.  
  88.